import React from 'react'
import {BrowserRouter as Router , Route , Switch} from 'react-router-dom'
import { createBrowserHistory } from "history";

import Main from '../pages/main'
import Login from '../pages/login'

export default class MyRoute extends React.Component{
    render(){
        return(
            <Router history={createBrowserHistory()}>
                <Switch>
                    <Route exact path="/" component={Login}/>
                    <Route path='/main' component={Main}></Route>   
                </Switch>
            </Router>
        )
    }  
}
